import request from "@/utils/request"
import qs from "qs"

// 上传文件
export const commonUpload = (file: FormData) => {
  return request.post('/api/nest/common/upload', file)
}

// 发送邮箱验证码
export const sendEmailCode = (params: { email: string }) => {
  return request.post('/api/nest/common/email/randCode', qs.stringify(params))
}

// 验证手机验证码
export const sendPhoneCode = (params: { phone: string }) => {
  return request.post('/api/nest/common/phone/randCode', qs.stringify(params))
}
